<?php

namespace App\Models;

use App\Models\Live;
use Illuminate\Database\Eloquent\Model;

// 存储聊天信息
class Chat extends Model
{
    protected $fillable = [
        'type',
        'sequence',
        'content',
        'created_at',
        'updated_at',
        'send_time'
    ];

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function live()
    {
        return $this->belongsTo(Live::class);
    }

    protected $dates = [
        'send_time'
    ];

}
